﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OSISEthnicityDataLayer;
using System.Data;

namespace OSISEthnicityBusinessLogic
{
    
   public class EthnicityBL
    {

        private int ethnicityld;
        private string ethnicityname;
        private string ethnicityshortname;
        private string lastupdated;
        private string flag;
        private string shortorder;
        private int schid;


        public EthnicityBL()
        {
            ethnicityld = 0;
            ethnicityname = "";
            ethnicityshortname = "";
            lastupdated = "01/01/1900";
            flag = "A";
            shortorder = "";
            schid = 0;
        }

       

        public int EthnicityID
        {
            get
            {
                return this.ethnicityld;
            }
            set
            {
                this.ethnicityld = value;
            }
        }

        public String EthnicityName
        {
            get
            {
                return this.ethnicityname;
            }
            set
            {
                this.ethnicityname = value;
            }
        }

        public String EthnicityShortName
        {
            get
            {
                return this.ethnicityshortname;
            }
            set
            {
                this.ethnicityshortname = value;
            }
        }

        public String LastUpdated
        {
            get
            {
                return this.lastupdated;
            }
            set
            {
                this.lastupdated = value;

            }
        }

        public String Flag
        {
            get
            {
                return this.flag;
            }
            set
            {
                this.flag = value;

            }
        }

        public String ShortOrder
        {
            get
            {
                return this.shortorder;
            }
            set
            {
                this.shortorder = value;

            }
        }

        public int SchoolID
        {
            get
            {
                return this.schid;
            }
            set
            {
                this.schid = value;
            }
        }

        public void AddEthnicity()
        {
            EthnicityDL ENDL = new EthnicityDL();
            ENDL.AddEthnicitys(this);
        }

        public void UpdateEthnicity()
        {
            EthnicityDL ENDL = new EthnicityDL();
            ENDL.UpdateEthnicity(this);
        }

        public System.Data.DataTable PopulateEthnicity()
        {
            DataTable dt = null;
            EthnicityDL ENDL = new EthnicityDL();

            dt = ENDL.EthnicityDetails(this);
            return dt;
        }
        public void UpdateEthnicityFlag()
        {
            EthnicityDL ENDL = new EthnicityDL();
            ENDL.UpdateEthnicityFlag(this);
        }

        public void UpdateShortOrder()
        {
            EthnicityDL ENDL = new EthnicityDL();
            ENDL.UpdateEthnicityShortOrder(this);
        }
    }
}
